package cn.wit.test;

import java.io.File;

import org.junit.Test;

/**
 * 练习文件操作
 * @author 16604
 *
 */
public class DemoFile {
	
	private String path = "D:\\暑期作业与笔记\\camp\\code\\day27";
	
	public static void main(String[] args) {
		
	}
	
	@Test
	public void test() {
		
		File file = new File(path);
		
		isDirectory(file);
		
	}
	
	public void isDirectory(File file) {
		
		File[] files = file.listFiles();
		
		for(int i =0;i<files.length;i++) {
			
			if(files[i].isDirectory()) {
				isDirectory(files[i]);
			}else {
				System.out.println(files[i].getAbsolutePath());
			}
			
		}
		
	}

}
